#ifndef _TOKENIZER_H
#define	_TOKENIZER_H

#include <string>
#include "inputfilestream.h"
#include <vector>
#include "token.h"

namespace obj {

    typedef enum {
        NO_ERROR,
        EOF_REACHED,
        TOKEN_NOT_RECOGNIZED
    } TokenizerResult;

    class tokenizer {
    public:
        tokenizer(const std::string& filename);
        void addToken(obj::tokens::token& token);
        TokenizerResult next(std::string& token);
    private:
        obj::inputfilestream ifs;
        std::vector<obj::tokens::token*> tokens;

        unsigned countTokens(const std::string&);
        obj::tokens::token& getToken();
    };
}

#endif	/* _TOKENIZER_H */

